package com.atguigu.jxc.controller;

import com.atguigu.jxc.service.ReturnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping
public class ReturnController {
    @Autowired
    private ReturnService returnService;
    /**
     * 请求URL：http://localhost:8080/returnListGoods/count
     * 请求参数：String sTime, String eTime ,Integer goodsTypeId, String codeOrName
     * 请求方式：POST
     * 返回值类型：JSON
     * 返回值：String
     */
    @PostMapping("returnListGoods/count")
    public List<Map> count(String sTime, String eTime , Integer goodsTypeId, String codeOrName){
        return returnService.count(sTime,eTime,goodsTypeId,codeOrName);
    }
    /**
     * 请求URL：http://localhost:8080/customerReturnListGoods/count
     * 请求参数：String sTime, String eTime, Integer goodsTypeId, String codeOrName
     * 请求方式：POST
     * 返回值类型：JSON
     * 返回值：String
     */
    @PostMapping("customerReturnListGoods/count")
    public List<Map> customerReturnCount(String sTime, String eTime ,Integer goodsTypeId, String codeOrName){
        return returnService.customerReturnCount(sTime,eTime,goodsTypeId,codeOrName);
    }
}
